﻿open Mono.Cecil

let TypeArgument = GenericParameter("T", null)

let ValueField = FieldDefinition("Value", TypeArgument, FieldAttributes.Public)

// TODO: it's possible that Box's base type must be ValueType or Object
let Type =
    let typedef = TypeDefinition("Box", "CliCore!", TypeAttributes.SpecialName, null)
    typedef.GenericParameters.Add(TypeArgument)
    typedef.Fields.Add(ValueField)
    typedef
